package com.example.rocketmqdemo.transaction;

import com.example.rocketmqdemo.transaction.client.AccountAppService;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@RocketMQMessageListener(topic = AccountAppService.TOPIC_ACCOUNT_TRANSFER,
        consumerGroup = "${spring.application.name}_consumer_group")
public class TransactionMessageConsumerTest implements RocketMQListener<String> {

    @Override
    public void onMessage(String message) {
        log.info(">>>> message={} <<<<", message);
    }
}
